/**
 * 明细对账错误情况字典表
 * 0-平;1-中心多;2-医药机构多;3-数据不一致
 */
const nodeTypeArr = [{
  code: '1',
  name: '端子',
  img: require('@/assets/image/node/1.png')
}, {
  code: '2',
  name: '接点',
  img: require('@/assets/image/node/2.png')
}, {
  code: '3',
  name: '压板',
  img: require('@/assets/image/node/3.png')
}, {
  code: '4',
  name: '继电器',
  img: require('@/assets/image/node/4.png')
}, {
  code: '5',
  name: '空开',
  img: require('@/assets/image/node/5.png')
}, {
  code: '6',
  name: '其他',
  img: require('@/assets/image/node/6.png')
}];


function getName(val) {
  return (nodeTypeArr.find(item => {
    return item.code === val
  }) || {}).name
}

function getObj(val) {
  return nodeTypeArr.find(item => {
    return item.code === val
  }) || nodeTypeArr[5]
}

/**
 * 获取medType
 * @param code
 * @returns {*|{}}
 */
export default {
  nodeTypeArr,
  getName,
  getObj
}
